//
// Created by xunx on 2018/12/8.
//

#ifndef GOWILD_SPRITE_H
#define GOWILD_SPRITE_H

#include "Gowild.h"
#include "Node.h"
#include "Texture2D.h"

class Sprite : public Node {
public:
    Sprite();

    virtual void Draw() override;

    bool visible;

    void SetTexture(Texture2D texture);

    void SetSize(float x, float y);

    void SetPosition(float x, float y);

    void SetRotate(float x);

    glm::vec2 GetPosition();

    glm::vec2 GetSize();

    float GetRotate();

private:

    void Translate();
    glm::vec2 position;
    glm::vec2 size;
    GLfloat rotate;
    Texture2D texture;
};


#endif //GOWILD_SPRITE_H
